A computer network generally refers to a group of interconnected wired and/or wireless devices such as, for example, laptops, mobile phones, servers, fax machines, and printers. The computer network may support transfer of data, in the form of messages, between the network devices. A network device may determine the presence of one or more pre-specified strings in a message. Such a determination may be preformed, for example, by a security application, a billing application, or other similar applications. A network device may determine the presence of a pre-specified string such as a virus signature in a message based on, for example, a matching rule.
The network devices that determine the presence of pre-specified strings in a message may use, for example, a longest common sequence matching rule. The matching rules such as the longest common sequence matching rule may compare a start byte in the pre-specified string with each byte in the message until a match is found. After a match for the first byte is found the subsequent bytes of the pre-specified string and the message are byte-wise compared to determine a longest common sequence match. However, byte-by-byte comparison techniques may be computationally intensive.